﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminMP.Master" AutoEventWireup="true"
    CodeBehind="listaprodutos.aspx.cs" Inherits="Admin.cadastros.produtos" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="../scripts/jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../scripts/jquery-ui-1.8.16.custom/css/custom-theme/jquery-ui-1.8.16.custom.css" />
    <script src="../scripts/js/combo.js" type="text/javascript"></script>
    <style>
        .ui-button
        {
            margin-left: -1px;
        }
        .ui-button-icon-only .ui-button-text
        {
            padding: 0.35em;
        }
        .ui-autocomplete-input
        {
            margin: 0;
            padding: 0.48em 0 0.47em 0.45em;
        }
        
        a:link
        {
            text-decoration:none
        }
        a:hover
        {
            text-decoration:none
        }
        a:visted    
        {
            text-decoration:none
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="width: 100%; padding-top:20px">
        <div id="filtro" style="float: left; clear: both; padding: 10px 0px 20px 20px;margin-left:45px">
            <fieldset style="width: 780px;">
                <legend class="labelCadastro">Filtos</legend>
                <table style="width: 100%">
                    <tr>
                        <td>
                            <label for="txtNomPro" class="labelCadastro">
                                Nome do Produto:</label>
                            <asp:TextBox ID="txtNomPro" runat="server" ClientIDMode="Static"></asp:TextBox>
                        </td>
                        <td>
                            <div class="ui-widget" style="float: left">
                                <label for="cmbTipo" class="labelCadastro">
                                    Tipo:</label>
                                <asp:DropDownList ID="cmbTipo" runat="server" DataTextField="TppDes" DataValueField="TppID">
                                </asp:DropDownList>
                            </div>
                        </td>
                        <td style="text-align:right">
                            <asp:Button ID="btnPesquisar" CssClass="botao" runat="server" OnClick="btnPesquisar_Click" Text="Pesquisar" />
                        </td>
                        <td style="text-align:right">
                            <asp:Button ID="btnNovo" CssClass="botao" runat="server" OnClick="btnNovo_Click" Text="Novo" />
                        </td>
                    </tr>
                </table>
            </fieldset>
        </div>
        <br />
        <div id="lista" style="clear: both; padding: 0px 0px 10px 20px">
            <asp:UpdatePanel UpdateMode="Conditional" runat="server">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnPesquisar" EventName="Click" />
                </Triggers>
                <ContentTemplate>
                    <asp:Repeater runat="server" ID="rptProdutos">
                        <HeaderTemplate>
                            <table class="tabela" style="width:70%">
                                <thead class="cabecalho">
                                    <tr>
                                        <th scope="col" colspan="3">
                                            <strong>Produtos</strong>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <a  href="<%#Page.ResolveUrl("~/../Admin/cadastros/") + "produto.aspx?id=" + DataBinder.GetPropertyValue(Container.DataItem, "ProID")%>"
                                    style="text-decoration:none">
                                <td>
                                    <img alt="<%# DataBinder.GetPropertyValue(Container.DataItem, "ProDes")%>" 
                                        src="<%#Page.ResolveUrl("~/../imagens")%>/<%# DataBinder.GetPropertyValue(Container.DataItem, "img")%>" 
                                        style="width: 80px; height: 75px;text-decoration:none"/>
                                </td>
                                <td>
                                    <%#DataBinder.GetPropertyValue(Container.DataItem, "ProID")%>
                                </td>
                                <td>
                                    <%#DataBinder.GetPropertyValue(Container.DataItem,"ProDes")%>
                                </td>
                                </a>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </tbody> </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>
</asp:Content>
